cd "C:\Users\wie-dainn\Dropbox\Work\BIHS\Replication.Package"
use "Data\empowerment.dta", clear

*We will only use 85th percentile as a shock
*We will only use sample size from myear 1970 to 2009. 
*Table 1: Women's Empowerment 


*IV Regression

*Table 1: Women's Empowerment in Households

*1[Years of schooling (current-at marriage)>0]
ivreghdfe eduadd2 (cm=precipA_85Ndays) if sex==2 & myear>=1970 & myear<=2009 & mstatus==2 & age<32, absorb(dcode decade age) cluster(dcode)
outreg2 using Tables\Table4.doc, replace ctitle(additional years of schooling) label title(IV Regression) addtext(Upazila FE, Yes, Wedding Year FE, Yes, Age FE, Yes) addstat(First stage F statistics, e(widstat))

*Bargaining power in birth control
ivreghdfe bargaining_birth (cm=precipA_85Ndays) if sex==2 & myear>=1970 & myear<=2009 & mstatus==2, absorb(dcode decade age) cluster(dcode)
outreg2 using Tables\Table4.doc, append ctitle(birth control) label addtext(Upazila FE, Yes, Wedding Year FE, Yes, Age FE, Yes)  addstat(First stage F statistics, e(widstat))

*Threatened with divorce
ivreghdfe threaten_divorce2 (cm=precipA_85Ndays) if sex==2 & myear>=1970 & myear<=2009 & mstatus==2, absorb(dcode decade age) cluster(dcode)
outreg2 using Tables\Table4.doc, append ctitle(threatened with divorce) label addtext(Upazila FE, Yes, Wedding Year FE, Yes, Age FE, Yes) addstat(First stage F statistics, e(widstat))

*Verbally abused you
ivreghdfe abuse_verbally2 (cm=precipA_85Ndays) if sex==2 & myear>=1970 & myear<=2009 & mstatus==2, absorb(dcode decade age) cluster(dcode)
outreg2 using Tables\Table4.doc, append ctitle(verbal abuse) label addtext(Upazila FE, Yes, Wedding Year FE, Yes, Age FE, Yes) addstat(First stage F statistics, e(widstat))

*Physically abused you
ivreghdfe abuse_physically2 (cm=precipA_85Ndays) if sex==2 & myear>=1970 & myear<=2009 & mstatus==2, absorb(dcode decade age) cluster(dcode)
outreg2 using Tables\Table4.doc, append ctitle(physical abuse) label addtext(Upazila FE, Yes, Wedding Year FE, Yes, Age FE, Yes) addstat(First stage F statistics, e(widstat))




